using System;

namespace Core.Demo12_TypeCodeToInheritance
{
	public class TypeCodeToInheritance
	{
		public void HikeSalary(Employee employee)
		{
			switch (employee.Type)
			{
				case EmployementType.FullTime :
					employee.Salary += 500;
					break;
				case EmployementType.PartTime:
					employee.HourlyRate += 2;
					break;
				case EmployementType.Consulant :
					break;
			}
		}

		public void PayBonus(Employee employee)
		{
			switch (employee.Type)
			{
				case EmployementType.FullTime:
					employee.Bonus = 1000;
					break;
				case EmployementType.PartTime:
					employee.Bonus = 0;
					break;
				case EmployementType.Consulant:
					employee.Bonus = 100;
					break;
			}
		}
	}

	public class Employee
	{
		public EmployementType Type { get; set; }

		public double HourlyRate { get; set; }

		public double Salary { get; set; }

		public double Bonus { get; set; }
	}

	public enum EmployementType
	{
		FullTime,
		PartTime,
		Consulant,
	}



	public class FullTimeEmployee : Employee {}
	public class PartTimeEmployee : Employee {}
	public class ConsultantEmployee : Employee {}
}